<?php
require_once("../php/connection.php");

$fbid = "100001111138780	";

// delete all the groups which was created by that user
//$res = mysql_query("DELETE FROM site_groups WHERE `fbid`='$fbid'");
//if(!$res) echo mysql_error();

//deleting the user only from those circles where he was not the mod
$res = mysql_query("DELETE FROM site_group_members WHERE `fbid`='$fbid' AND `mod`!='1'");
if(!$res) echo mysql_error();

//deleting all the posts made by the user which were not anonymous
$res = mysql_query("DELETE FROM site_posts WHERE `user`='$fbid' AND `postas`!='anonymous'");
if(!$res) echo mysql_error();

//deleting all the posts made by the user which were not anonymous
$res = mysql_query("DELETE FROM site_invite WHERE `fbid`='$fbid'");
if(!$res) echo mysql_error();

// deleting all the responses made by the user
$res = mysql_query("DELETE FROM site_response WHERE `fbid`='$fbid'");
if(!$res) echo mysql_error();

// deleting all the subscriptions made by the user
$res = mysql_query("DELETE FROM site_requests WHERE `fbid`='$fbid'");
if(!$res) echo mysql_error();

// deleting all the subscriptions made by the user
$res = mysql_query("DELETE FROM site_subscribe WHERE `fbid`='$fbid'");
if(!$res) echo mysql_error();

$res = mysql_query("DELETE FROM site_user_meta WHERE `fbid`='$fbid'");
if(!$res) echo mysql_error();

?>